package com.grape.service.api.testproducer;

import com.grape.testproducer.TestProducer;
import com.grape.testproducer.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 描述:生产者接口
 * @author: myx
 * @date: 2019-05-24
 * Copyright © 2019-grape. All rights reserved.
 */
public interface ITestProducerService {

    @GetMapping("/test")
    TestProducer getTestProducer(@RequestParam String name);

    @GetMapping("/list")
    List<User> getUserListByH2();

    @PostMapping("/add")
    int addUser(User user);

    @PostMapping("/update")
    int updateUser(@RequestBody User user);
    @GetMapping("/delete")
    int deleteUser(@RequestParam Integer id);
}
